<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>ImageDialog Examples</title>
    <link rel="stylesheet" href="../themes/default/default.css"/>
    <script src="../kindeditor.js"></script>
    <script src="../lang/zh_CN.js"></script>
    <script>
        KindEditor.ready(function (K) {
            var editor = K.editor({
                allowFileManager:true
            });
            K('#image').click(function () {
                editor.loadPlugin('image', function () {
                    editor.plugin.imageDialog({
                        imageUrl:K('#url').val(),
                        clickFn:function (url, title, width, height, border, align) {
                            K('#url').val(url);
                            editor.hideDialog();
                        }
                    });
                });
            });
        });
    </script>
</head>
<body>
<input type="text" id="url" value=""/> <input type="button" id="image" value="选择图片"/>
</body>
</html>
